from fastapi import APIRouter

from core.agent_core import chat_exec
from entity.schema.model_schema import BaseModelInput
from utils.base_response import BaseResponse

agent=APIRouter()

@agent.post("/chat")
async def chat(input:BaseModelInput):
    message=await chat_exec(input.user_input)
    return BaseResponse(code=200,message="成功",data=message)